package com.wn.common.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="Traveller",description = "旅客实体类")
public class Traveller {

    @ApiModelProperty(hidden = true)
    private Integer travellerId;

    @NotBlank
    @ApiModelProperty(name="travellerName",value = "旅客姓名",example = "tom")
    @NotBlank(message = "旅客姓名不得为空！")
    private String travellerName;

    @NotBlank
    @ApiModelProperty(name="travellerAge",value = "旅客年纪",example = "18")
    @NotBlank
    private String travellerAge;

    @ApiModelProperty(name="travellerSex",value = "旅客性别",example = "男")
    private String travellerSex;
    //旅客电话
    private String travellerPhone;

    @ApiModelProperty(name="travellerPhotoWithIdcard",value = "带身份证的照片",example = "#")
    @NotBlank(message = "请上传手持身份证的照片")
    private String travellerPhotoWithIdcard;

    @ApiModelProperty(name="travellerIdcard",value = "身份证号")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$")
    private String travellerIdcard;

    @ApiModelProperty(hidden = true)
    private Integer createUserId;

    @ApiModelProperty(hidden = true)
    private String createTime;

    @ApiModelProperty(hidden = true)
    private Integer updateUserId;

    @ApiModelProperty(hidden = true)
    private String updateTime;
    @ApiModelProperty(hidden = true)
    private String travellerStatus;
    @ApiModelProperty(hidden = true)
    private String travellerIsDeleted;

    @ApiModelProperty(hidden = true)
    private Date earliestCreateTime;

    @ApiModelProperty(hidden = true)
    private Date latestCreateTime;

    @ApiModelProperty(hidden = true)
    private Date earliestUpdateTime;

    @ApiModelProperty(hidden = true)
    private Date latestUpdateTime;

    @ApiModelProperty(hidden = true)
    private User user;
}
